package p2000;

import java.util.Scanner;

public class Main2026首字母变大写 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextLine()) {
            String str = scanner.nextLine();
            StringBuilder sb = new StringBuilder("");
            char[] arr = str.toCharArray();
            int index;
            for (int i = 0; i < arr.length; i++) {
                if (i == 0) {
                    if (arr[i] >= 97 && arr[i] <= 122) {
                        arr[i] -= 32;
                    }
                }

                if (arr[i] == ' ') {
                    index = i + 1;
                    if (arr[index] >= 97 && arr[index] <= 122) {
                        arr[index] -= 32;
                    }
                }
            }

            for (char anArr : arr) {
                sb.append(anArr);
            }

            System.out.println(sb);
        }
    }

}
